package  com.cnn.base.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import  com.cnn.base.mapper.ReRoleResourceMapper;
import  com.cnn.base.model.ReRoleResource;
import  com.cnn.base.model.ReRoleResourceExample;
import  com.cnn.base.service.ReRoleResourceService;

@Service
public class ReRoleResourceServiceImpl implements ReRoleResourceService {

	@Resource
	private ReRoleResourceMapper reRoleResourceMapper;

	@Override
	public void addReRoleResource(ReRoleResource reRoleResource) {
		reRoleResourceMapper.insert(reRoleResource);
	}

	@Override
	public void updateReRoleResource(ReRoleResource reRoleResource) {
		reRoleResourceMapper.updateByPrimaryKeySelective(reRoleResource);
	}

	@Override
	public void deleteReRoleResource(Long id) {
		reRoleResourceMapper.deleteByPrimaryKey(id);
	}

	@Override
	public List<ReRoleResource> getReRoleResource() {
		return reRoleResourceMapper.selectByExample(new ReRoleResourceExample());
	}

	@Override
	public ReRoleResource getReRoleResourceById(Long id) {
		return reRoleResourceMapper.selectByPrimaryKey(id);
	}
}
